﻿<UserControl x:Class="RK.Wpf3DSampleBrowser.Samples.WpfBigScene.WpfBigSceneControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:gfx="http://www.rkoenig.eu/graphicsengine"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="600">
    <DockPanel LastChildFill="True">
        <DockPanel.Resources>
            <ResourceDictionary Source="SceneResources.xaml" />
        </DockPanel.Resources>

        <!-- Define forklift button-->
        <StackPanel DockPanel.Dock="Left" Width="200"
                    Orientation="Vertical"
                    Background="Transparent">
            <Button Margin="5" 
                    Click="OnCmdAddForklifts">
                    <Label FontSize="16" FontWeight="Bold">
                        Add Forklifts
                    </Label>
            </Button>
            <Button Margin="5" 
                    Click="OnCmdAddForklifts">
                <Label FontSize="16" FontWeight="Bold">
                    Add Cubes
                </Label>
            </Button>
        </StackPanel>

        <!-- Show models on screen -->
        <Grid>
            <gfx:WpfModelViewerControl Name="m_viewport"
                                       CameraVerticalRotation="45"
                                       CameraMaximumDistance="500"
                                       CameraDistance="20">
                <gfx:WpfModelViewerControl.Visual3DChildrenViewport>
                    <ModelVisual3D Content="{StaticResource ForkliftModel}">
                        <ModelVisual3D.Transform>
                            <TranslateTransform3D OffsetX="0" />
                        </ModelVisual3D.Transform>
                    </ModelVisual3D>

                    <ModelVisual3D Content="{StaticResource ForkliftModel}">
                        <ModelVisual3D.Transform>
                            <TranslateTransform3D OffsetX="2" />
                        </ModelVisual3D.Transform>
                    </ModelVisual3D>

                    <ModelVisual3D Content="{StaticResource ForkliftModel}">
                        <ModelVisual3D.Transform>
                            <TranslateTransform3D OffsetX="4" />
                        </ModelVisual3D.Transform>
                    </ModelVisual3D>

                    <ModelVisual3D Content="{StaticResource ForkliftModel}">
                        <ModelVisual3D.Transform>
                            <TranslateTransform3D OffsetX="-2" />
                        </ModelVisual3D.Transform>
                    </ModelVisual3D>

                    <ModelVisual3D Content="{StaticResource ForkliftModel}">
                        <ModelVisual3D.Transform>
                            <TranslateTransform3D OffsetX="-4" />
                        </ModelVisual3D.Transform>
                    </ModelVisual3D>
                </gfx:WpfModelViewerControl.Visual3DChildrenViewport>
            </gfx:WpfModelViewerControl>
        </Grid>
    </DockPanel>
</UserControl>
